﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly="Inovout.Cloud.Storage"
				       namespace="Inovout.Cloud.Storage.Models" >

  <class name="Bucket" table="Storage_Bucket">
    <id name="Id" access="field.camelcase"
        column="BucketId" type="Int32">
      <generator class="native" />
    </id>
    <property name="Name" unique="true" />
    <many-to-one name="Folder" column="FolderId" foreign-key="FK_Bucket_Folder" />
    <many-to-one name="Project" column="ProjectId" />
    <set name="Objects" inverse="true">
      <key column="BucketId" />
      <one-to-many class="Object" />
    </set>
    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>


